package com.bt.springboot.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.bt.springboot.common.annotation.PrivacyEncrypt;
import com.bt.springboot.common.enums.PrivacyTypeEnum;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;

/**
 * @author zkx
 * @Date 2022/4/26 13:41
 */
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Person implements Serializable {

	private Long id;

	@NotBlank(message = "名字不能为空")
	@JSONField(name = "userName")
	private String name;

	private int age;

	@PrivacyEncrypt(type = PrivacyTypeEnum.PHONE)
	private String phone;

	private Long salesCrmId;

	private String salesName;

	private String department;

	private String center;
}
